class guize:
    def __init__(self,n):
        self.n=n
    def zhi(self):
        return 0

class pingfang(guize):
    def __init__(self,n,b):
        super().__init__(n)
        self.b=b
    def zhi(self):
        return self.b**2
class lifang(guize):
    def __init__(self,n,b):
        super().__init__(n)
        self.b=b
    def zhi(self):
        return self.b**3

def method(guize): # int str list  shape1代表一个对象
    print(guize.n,"输出值:",guize.zhi())

a=guize('suanfa')
b=pingfang('平方算法',3)
c=lifang('立方算法',3)

method(a)
method(b)
method(c)
class X:
    def __init__(self,n):
        self.n = n

    def zhi(self):
        return 56
method(X('weizhi'))